# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Contributor: Antoine Fontaine <antoine.fontaine@epfl.ch>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=py3-idna-ssl
_pkgname=idna-ssl
pkgver=1.1.0
pkgrel=4
pkgdesc="Patch ssl.match_hostname for Unicode(idna) domains support"
url="https://github.com/aio-libs/idna-ssl"
arch="noarch"
license="MIT"
depends="py3-idna"
checkdepends="py3-pytest py3-pytest-cov py3-aiohttp"
makedepends="py3-setuptools"
source="$_pkgname-$pkgver.tar.gz::https://github.com/aio-libs/idna-ssl/archive/v$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"

replaces=py-idna-ssl # Backwards compatibility
provides=py-idna-ssl=$pkgver-r$pkgrel # Backwards compatibility

options="!check"

build() {
	python3 setup.py build
}

check() {
	python3 -m pytest
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}

sha512sums="01e58e9f32f7e02ef203edbd76e199916ea0b16d01a929ca2fb272d83988483c17e9c36e131f47bfba7f7b657bef9e2be222f81800716a5b87d5847c27cce34d  idna-ssl-1.1.0.tar.gz"
